[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 LET VAR = EXP

 Function
  Evaluate an expression and assign the result to a variable.

 Syntax
  LET var = expr
  -or-
  var = expr

   var   - Variable to which the result of expr should be assigned.
   expr  - Any valid PPL expression.

 Remarks
  The LET statement supports modes of operation:  explicit and implicit.
  An explicit LET statement always includes all of the parts in the first
  example above (the LET keyword, the variable, the equal sign, and the
  expression).  An implicit LET statement does not need the LET keyword;
  the format (var = expr) is sufficient.  However, the implicit form will
  not always work.

  For example, if you had a variable named PRINT (which is also a
  statement name) you could not use PRINT = expr; PPL expects the first
  word on a line to be a statement name, and if it isn't, it is an
  implicit LET statement.  Since PPL would find the PRINT statement first
  it would try to process the rest of the line as a PRINT statement.  This
  is easily avoided by using the LET keyword and making it an explicit LET
  statement (LET PRINT = expr).

 Examples
  INTEGER i
  STRING  s
  GETUSER
  LET U_PWD = "NEWPWD"
  LET s = "This is a string"
  LET i = 7*9+9*7
  PUTUSER

See Also:
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson